package ru.space.academy.model;

import jakarta.persistence.*;

import java.util.List;


@Entity
@Table(name = "mentor", schema = "public")
public class Mentor extends User {

    @Column(name = "profession", nullable = false)
    @Enumerated(EnumType.STRING)
    private Profession profession;

    @Column(name = "experience", nullable = false)
    private byte experience;

    @ManyToMany
    @JoinTable(
            name = "mentor_tech_stack",
            joinColumns = @JoinColumn(name = "mentor_id"),
            inverseJoinColumns = @JoinColumn(name = "tech_stack_id"))
    private List<TechStack> techStackList;

    @Override
    public String getUsername() {
        return this.login;
    }

    public Profession getProfession() {
        return profession;
    }

    public void setProfession(Profession profession) {
        this.profession = profession;
    }

    public byte getExperience() {
        return experience;
    }

    public void setExperience(byte experience) {
        this.experience = experience;
    }

    public List<TechStack> getTechStackList() {
        return techStackList;
    }

    public void setTechStackList(List<TechStack> techStackList) {
        this.techStackList = techStackList;
    }
}